package example.lesson02_01;

public class TestClassAndObject {
    public static void main(String[] args){
        Person p1 = new Person();
        int i = 20;
        p1.age = i;
        p1.printInfo();
        Person p2 = new Person();
        p2.age = 18;
        p2.printInfo();
        Person p3 = new Person();
        p3.age = 23;
        p3.printInfo();
        Person p4 = new Person();
        p4.age = 25;
        p4.printInfo();
    }
}

class Person{
    public int age;
    public void printInfo(){
        System.out.println("age:" + age);
    }
}